<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Admin\GoodType;

class GoodTypeController extends Controller
{
    public function getList(Request $request)
    {
        $goodType = new GoodType;
        $data = $goodType->getList($request);

        return $data;
    }

    public function getStore()
    {
        $goodType = new GoodType;
        $data = $goodType->getStore();

        return $data;
    }

    public function handle(Request $request)
    {
        $goodType = new GoodType;
        $result = $goodType->handle($request);

        return $result;
    }

    public function delete(Request $request)
    {
        $id = $request["id"];
        $goodType = new GoodType;
        $result = $goodType->deleteAction($id);
        
        return $result;
    }
}
